-
-
Notifications
You must be signed in to change notification settings - Fork 49
Conversation
…the example, reduce the MATLAB-ness, add the new parameter functionality, comment that there are keyword arguments
…merical values so that the example code does not give InexactErrors. Removed spaces in docs of ode23
Thanks for the PR. Unfortunately, things are a bit complicated ... Firstly,
should work already now for all solvers (maybe FastAnonymous.jl might be worth a look in this context). But maybe I missed what you were trying to achieve ... |
Thanks for the comments (and apologies for the delay in replying). I agree that anonymous functions provide a solution to the problem, but it seems strange if one already has a function, say As you imply, this will also presumably involve a performance hit, though For what it's worth, both I am happy to go through and add parameter splatting to the other functions if this is the consensus -- I just thought that for my first PR I would be conservative! Any thoughts on the documentation changes? Some of those are necessary (since the current documentation for |
Maybe you can use https://github.com/mauro3/IVPTestSuite.jl for performance testing. (But I guess you're aware of that package ;-) |
Great, thanks! |
For what my opinion is worth, I would prefer to keep using the anonymous functions to pass parameters. This way the implementation of |
Personally, I don't see a problem with anonymous functions (performance aside, but this will certainly improve). AFAIK MATLAB dropped passing parameters the way you suggest (at least there is noting in the current documentation) and Python might do it for performance reasons, but someone else has to comment on the reasons. I would support a solution that is more general, i.e. in the direction of having a "problem" type like we discussed for instance in #30. Having this could obviously include support for passing extra parameters.
I like the changes and in particular the move to Docile. As I said above, |
Regarding the issue. I prefer an anonymous function solution. This is also what matlab does. I'm not sure this pull request will have much impact on performance as passing functions to functions is already bad. Hopefully, this will be fixed in Julia soon! Until then FastAnonymous.jl probably is fastest, faster than passing in the function. |
Yeah, I think anonymous functions is much cleaner too (I actually think the Performance-wise, this is not something we should worry about in ODE.jl - Julia as a whole will be crippled compared to its ambitions until this is resolved, so I would be very surprised if this isn't fixed way before 1.0. |
The problem with anonymous functions is that you can only do one thing with them (call them). If the user defines an |
@dpsanders : Now we have removed the old implementation of |
This adds to
ode23
the possibility to pass parameters through to the function to integrate, via parameter splatting. This is useful functionality; see, for example, this post on Julia-users.I also updated (read: corrected) the documentation to use the Julia, not MATLAB, convention, and to not give
InexactError
s.The last commit updates the documentation to use the
@doc
style.